home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / cdev / scroll.sit / Scroll Limit Docs next >
Text File  |  1989-04-06  |  6KB  |  128 lines

  1. Scroll Limit CDEV (Version 1.0)
  2. ===============================
  3. Written by Ken McLeod
  4. Copyright ⌐1989, Blue Cloud Software; All Rights Reserved
  5.  
  6. You may use and distribute Scroll Limit at no charge, but you may not
  7. sell it, or collect money for its distribution (normal disk duplication
  8. fees excepted).  Anyone wishing to distribute Scroll Limit along with any
  9. commercial or shareware software package may do so only with my express
  10. written consent.
  11.  
  12.  
  13. Purpose & Description
  14. ---------------------
  15.     The enhanced processing power available in the Macintosh IIx and
  16. SE/30, as well as in various third-party "accelerator" boards for the Mac
  17. Plus, SE, and II, tends to dramatically increase the speed of scroll bars
  18. and other dynamic controls.  Ironically, this "speeded-up action" actually
  19. becomes a disadvantage when small, precise scrolling increments are
  20. desired.  Apple provides for user control of the key-repeat rate with the
  21. "Keyboard" Control Panel Device, but no method has been available for
  22. regulating the action rate of controls.
  23.  
  24.     Scroll Limit provides this "missing control" with a Control Panel
  25. Device (CDEV) that allows you to select the rate and threshold delay
  26. of your scroll bars.
  27.  
  28.     Note that while Scroll Limit was designed for faster machines
  29. (especially those running at speeds greater than 16 MHz), it will work
  30. on any Macintosh model except the 128K and unenhanced 512K.
  31.  
  32.  
  33. Installing Scroll Limit
  34. -----------------------
  35.     Place the Scroll Limit file in your System Folder and reboot.  That's
  36. all there is to it.  You must be running System 4.1 or greater to use
  37. Scroll Limit (but you probably guessed as much).
  38.  
  39.  
  40. Using Scroll Limit
  41. ------------------
  42.     Scroll Limit automatically installs itself into memory at startup.
  43. (In technical jargon, that's because it's an "INIT/cdev combo.")  If you
  44. don't want Scroll Limit to load for some reason, just hold down either
  45. the mouse button or the Shift key while your Mac is starting up.
  46.  
  47.     You can configure Scroll Limit by bringing up the Control Panel desk
  48. accessory from the Apple menu, and selecting the Scroll Limit icon.
  49. There are two separate settings: "repeat rate," and "delay before repeat."
  50. The "delay before repeat" is the amount of time that should pass AFTER the
  51. first click and subsequent scroll action, but BEFORE "continuous scrolling"
  52. begins.  The "repeat rate" is the minimum amount of time each repeated
  53. scrolling action should take.  These settings work in much the same
  54. fashion as the "Keyboard" or "Mouse" repeat settings.
  55.  
  56.     A "test" scroll bar is provided, so you can experiment with the results
  57. of different settings.  There is also a "Startup Icon" checkbox; if it's
  58. checked, the Scroll Limit icon will appear on your screen at startup to let
  59. you know it's been installed.  Finally, the "question mark (?)" button
  60. displays much of the same information that you're already reading here.
  61.  
  62.  
  63. Technical Info
  64. --------------
  65.     Well-written programs call _TrackControl when a click in a scroll bar
  66. (or other dynamic control) is detected, generally passing it a pointer
  67. to an "action procedure" that is to be executed once per "increment."
  68. The _TrackControl routine enters a loop in which the action procedure
  69. is called, then _WaitMouseUp is called to determine if the mouse button
  70. is still down. If it is, the action procedure is called again, and so on
  71. until _WaitMouseUp returns false.
  72.  
  73.     Scroll Limit works by patching the _WaitMouseUp trap.  Since the
  74. time taken for one "scrolling increment" is divided between the action
  75. procedure and _WaitMouseUp, we can measure the time (in ticks) between
  76. successive calls to _WaitMouseUp to determine the rate of a single
  77. increment. If this time is less than a constant X, the patch simply loops
  78. until the total time taken is X or the mouse button is released; if the
  79. time already spent is greater than X, the patch does nothing.  A special
  80. case occurs the first time that _WaitMouseUp is called after the scroll
  81. bar is clicked: the "threshold" before subsequent repeats. In this
  82. instance, a separate value Y (usually longer than X) is used to time the
  83. increment.  This method has the advantage of not further slowing down
  84. already "scrolling-intensive" applications, and it allows a constant
  85. maximum "scroll speed" to be maintained across different applications
  86. and machines.
  87.  
  88.     The tick constants, X and Y, are set by the user in the Control Panel.
  89. Each radio button represents a different constant rate (in ticks), ranging
  90. from 0 (the "None" setting) to a maximum value, or "longest" time interval.
  91. These constants are stored in a STR# resource, and can be edited with
  92. ResEdit, if desired, to provide a different range of settings (although I
  93. request that you do not distribute any copies that you modify in this way!)
  94.  
  95.     The strings have the following format:
  96.  
  97.                     0,n1,n2,n3,n4,n5,n6
  98.  
  99. where the first number is always 0, followed by six numbers (n1-n6)
  100. ranging in value from low to high.  Each number is separated by a comma.
  101.  
  102. Further implementation details are left as an exercise to the reader. :-)
  103.  
  104.  
  105. Future Enhancements
  106. -------------------
  107.     In testing Scroll Limit, it became obvious that the "ideal" rate of
  108. speed for scroll bars differs with their application.  In the most common
  109. usage -- scrolling lines of text in a word processor or text editor -- it
  110. seems most desireable to have ONLY a "threshold delay", with no subsequent
  111. repeat delays.  However, when trying to scroll to a particular file in the
  112. standard file dialog on a fast machine, the need for a somewhat slower
  113. repeat speed is evident.  A future version of ScrollLimit may incorporate
  114. the ability to select alternate settings for different contexts.
  115.  
  116.  
  117. Comments, Suggestions, Etc.
  118. ---------------------------
  119.     If you have bug reports or suggestions, I can be contacted via
  120. electronic mail at:
  121.  
  122.     {zardoz felix}!dhw68k!thecloud    (UUCP)
  123.     thecloud@dhw68k.cts.com            (InterNet)
  124. or
  125.   The AppleBus BBS    (818) 919-5459        (box #8, or send mail to sysop)
  126.  
  127.     Sorry, no high-priced CompuServe or AppleLink addresses (yet).
  128.